package com.ss.android.newmedia.message.dialog;

import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface;
import android.content.Intent;
import com.ss.android.newmedia.message.i;
import org.json.JSONObject;

public final class r implements DialogInterface.OnClickListener {
    private final Context a;
    private final Intent b;
    private final int c;

    public r(Context arg1, Intent arg2, int arg3) {
        this.a = arg1;
        this.b = arg2;
        this.c = arg3;

    }

    public final void onClick(DialogInterface arg9, int arg10) {
        arg9.dismiss();
        switch(arg10) {
            case -2: {
                i.a(this.a, "news_alert_close", ((long)this.c), -1, false, new JSONObject[0]);
                return;
            }
            case -1: {
                try {
                    this.a.startActivity(this.b);
                }
                catch(Exception v0) {
                    v0.printStackTrace();
                }
                return;
            }
        }

        return;
    }
}

